public class Main {
    public static void main(String[] args) {
        System.out.println(new Solution().findLengthOfLCIS(new int[]{1,3,5,4,7}));
        System.out.println(new Solution().findLengthOfLCIS(new int[]{1,3,5,4,5,6,7}));
        System.out.println(new Solution().findLengthOfLCIS(new int[]{2,2,2,2,2}));
    }
}

class Solution {
    public int findLengthOfLCIS(int[] nums) {
        int maxLen = 1;
        int curLen = 1;
        for (int i = 1; i < nums.length; i++) {
            if (nums[i] > nums[i - 1]) {
                curLen++;
                maxLen = Math.max(maxLen, curLen);
            } else {
                curLen = 1;
            }
        }
        return maxLen;
    }
}